package br.com.nrti.still.eventos;

import android.content.Context;
import android.net.wifi.WifiManager;

public class Wifi {
	public static final String ACAO_WIFI_NAO_ALTERAR = "NAO";
	public static final String ACAO_WIFI_DESLIGAR = "DES";
	public static final String ACAO_WIFI_LIGAR = "LIG";
	public static final String ACAO_WIFI_VOLTAR_ANTERIOR = "ANT";	
	
	private static WifiManager wifiManager;

	public static void inicializar(Context context) {
		wifiManager = (WifiManager) context
				.getSystemService(Context.WIFI_SERVICE);
	}

	public static boolean getStatus() {
		return (wifiManager.getWifiState() == WifiManager.WIFI_STATE_ENABLED || wifiManager
				.getWifiState() == WifiManager.WIFI_STATE_ENABLING);
	}
	
	public static void setAtivo() {
		wifiManager.setWifiEnabled(true);
	}
	
	public static void setInativo() {
		wifiManager.setWifiEnabled(false);
	}
}
